﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using FY2013.Model;

namespace FY2013.Model.UserModels
{
    [PropertiesMustMatch("Password", "ConfirmPassword", ErrorMessage = "两次密码输入必须相同！")]
    public class RegisterAccountModel
    {
        [Required(ErrorMessage="用户账号不能为空！")]
        [DisplayName("用户账号")]
        public string Account
        {
            get;
            set;
        }

        [Required(ErrorMessage="验证邮箱不能为空！")]
        [DataType(DataType.EmailAddress)]
        [DisplayName("验证邮箱")]
        public string Email
        {
            get;
            set;
        }

        [Required(ErrorMessage = "请输入密码！")]
        [DataType(DataType.Password)]
        [DisplayName("输入密码")]
        public string Password
        {
            get;
            set;
        }

        [Required(ErrorMessage = "请再次输入密码！")]
        [DataType(DataType.Password)]
        [DisplayName("再次输入密码")]
        public string ConfirmPassowrd
        {
            set;
            get;
        }

        [Required(ErrorMessage = "第一语言不能为空！")]
        [DisplayName("第一语言（或母语）")]
        public string FirstLanguage
        {
            get;
            set;
        }

        [DisplayName("个人简介")]
        public string Introduction
        {
            get;
            set;
        }

        [Required(ErrorMessage = "验证码不能为空！")]
        [DisplayName("请正确输入验证码")]
        public string VerificationCode
        {
            get;
            set;
        }

        [Required(ErrorMessage = "必须接受协议才能注册！")]
        [DefaultValue(true)]
        [DisplayName("接受协议")]
        public bool AcceptAgreement
        {
            get;
            set;
        }
    }
}
